package org.example.httphandler;

import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;

import java.io.IOException;

/**
 * @author 胡帅博
 * @date 2021/6/11 14:14
 */
public class DefaultHandler implements HttpHandler{


    @Override
    public void handle(HttpExchange exchange) throws IOException {
        Headers responseHeaders = exchange.getResponseHeaders();
        responseHeaders.set("content-type", "text/plain; charset=UTF-8");
    }


}
